import request from '@/utils/request'

export function getTaskList(params) {
    return request({
        url: '/task/list',
        method: 'get',
        params,
    })
}

export function getTask(params) {
    return request({
        url: '/task/getTask',
        method: 'get',
        params,
    })
}

export function getResponsiblePeopleList(params) {
    return request({
        url: '/task/listResponsiblePeople',
        method: 'get',
        params,
    })
}


export function createTask(data) {
    return request({
        url: '/task/createTask',
        method: 'post',
        data
    })
}

export function editTask(data) {
    return request({
        url: '/task/editTask',
        method: 'post',
        data
    })
}

export function startTask(data) {
    return request({
        url: '/task/startTask',
        method: 'post',
        data
    })
}

export function pendingTask(data) {
    return request({
        url: '/task/pendingTask',
        method: 'post',
        data
    })
}

export function deleteTask(data) {
    return request({
        url: '/task/deleteTask',
        method: 'post',
        data
    })
}

export function completeTask(data) {
    return request({
        url: '/task/completeTask',
        method: 'post',
        data
    })
}

export function releaseTask(data) {
    return request({
        url: '/task/releaseTask',
        method: 'post',
        data
    })
}
export function createCompleteTask(data) {
    return request({
        url: '/task/createCompleteTask',
        method: 'post',
        data
    })
}